SpatialStream® Code Examples

Points of Interest Fire and Police

Using SpatialStream® Points of Interest Layer, SLD (Stylized Layer Descriptor), and GetMap components, you can access nationwide Points of Interest data and basic attributes for display in your mapping application. This example will demonstrate how to add POI data for the entire US. Filters are applied to display fire, police, libraries and post offices. The SLD component allows you to apply an icon and add labels based on attributes in the Points of Interest layer and tailor the following display parameters of your POI's: Icon, Icon Background color, and size. Once the SLD is defined, the GetMap component generates the overlay for your map.

The primary benefit of defining a layer’s style in an SLD is that the layer style definitions are maintained outside the code, so making changes to the layer style are fast and easy as application code doesn’t need to be changed to do so. Because layer styling is separate from the application, you have the option of letting data visualization experts style your layers, who may not necessarily be your application programmers.

SLD | GetMap


layer = new Dmp.Layer.WmsLayer("POI", "SS", {
visibility: false
});
layer.addChild("point", "SS.Admin.TT.POI/POI", "PUBLIC_FOLDER/Styles/POI/RREFIREPOLPOSTLIB.sld.xml", {
zIndex: 100, zoomRange: {
min: 10, max: 19
}
});
map.addEntity(layer);


Run Sample   Back To Index